﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Master.Master" AutoEventWireup="true"
    CodeBehind="ManageAnnouncement.aspx.cs" Inherits="Hospital.Web.ManageAnnouncement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="sub_block1">
        <div id="content_block">
            <asp:GridView ID="gvAnnouncement" runat="server" AutoGenerateColumns="False" OnRowCommand="gvAnnouncement_RowCommand"
                AllowPaging="True" DataKeyNames="Id" OnPageIndexChanging="gvAnnouncement_PageIndexChanging" 
                PageSize="2" onrowdeleting="gvAnnouncement_RowDeleting" 
                onrowediting="gvAnnouncement_RowEditing">
                <Columns>
                    <asp:TemplateField HeaderText="操作">
                        <ItemStyle Width="80" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbEdit" runat="server" Text="编辑" CommandName="Edit"></asp:LinkButton>
                            <asp:LinkButton ID="lbDelete" runat="server" Text="删除" CommandName="Delete" OnClientClick="return confirm('是否需要删除此记录');"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Id" Visible="false" />
                    <asp:TemplateField HeaderText="发布日期">
                        <ItemStyle Width="100" />
                        <ItemTemplate>
                            <asp:Label ID="lPublishDate" runat="server" Text='<%# Bind("PublishDate","{0:yyyy-MM-dd}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="标题">
                        <ItemStyle Width="300" />
                        <ItemTemplate>
                            <asp:Label ID="lTitle" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="查看详情">
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbReviewDetail" runat="server" Text="查看" CommandArgument='<%#Bind("Id")%>'
                                CommandName="ReviewDetail"> </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
</asp:Content>
